
import os
f=open('src.html','r')
content=f.read()
f.seek(0,os.SEEK_SET)
part=''
taghead='<div class="'+input('Enter the class: ')+'">'
tagtail=input('Specify a sign to end the loop: ')
for line in f:
    if taghead in line:
        break
for line in f:
    if tagtail in line:
        break
    else:
        part+=line
f.close()
difference=input('Input the rewritten content: ')
f=open('src.html','w')
f.write(content.replace(part,difference))
f.close()
